3.1.57 \(\int \frac {x (a+b \log (c x^n))}{(d+e x)^4} \, dx\) [57]

Optimal. Leaf size=117 \[ -\frac {b n}{6 e^2 (d+e x)^2}+\frac {b n}{6 d e^2 (d+e x)}+\frac {b n \log (x)}{6 d^2 e^2}+\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {b n \log (d+e x)}{6 d^2 e^2} \]

[Out]

-1/6*b*n/e^2/(e*x+d)^2+1/6*b*n/d/e^2/(e*x+d)+1/6*b*n*ln(x)/d^2/e^2+1/3*d*(a+b*ln(c*x^n))/e^2/(e*x+d)^3+1/2*(-a
-b*ln(c*x^n))/e^2/(e*x+d)^2-1/6*b*n*ln(e*x+d)/d^2/e^2

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {45, 2382, 12, 78} \begin {gather*} -\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}+\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}+\frac {b n \log (x)}{6 d^2 e^2}-\frac {b n \log (d+e x)}{6 d^2 e^2}+\frac {b n}{6 d e^2 (d+e x)}-\frac {b n}{6 e^2 (d+e x)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(a + b*Log[c*x^n]))/(d + e*x)^4,x]

[Out]

-1/6*(b*n)/(e^2*(d + e*x)^2) + (b*n)/(6*d*e^2*(d + e*x)) + (b*n*Log[x])/(6*d^2*e^2) + (d*(a + b*Log[c*x^n]))/(
3*e^2*(d + e*x)^3) - (a + b*Log[c*x^n])/(2*e^2*(d + e*x)^2) - (b*n*Log[d + e*x])/(6*d^2*e^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 2382

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_))^(q_), x_Symbol] :> With[{u = IntHide[
x^m*(d + e*x)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]] /; FreeQ
[{a, b, c, d, e, n}, x] && ILtQ[m + q + 2, 0] && IGtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx &=\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-(b n) \int \frac {-d-3 e x}{6 e^2 x (d+e x)^3} \, dx\\ &=\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {(b n) \int \frac {-d-3 e x}{x (d+e x)^3} \, dx}{6 e^2}\\ &=\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {(b n) \int \left (-\frac {1}{d^2 x}-\frac {2 e}{(d+e x)^3}+\frac {e}{d (d+e x)^2}+\frac {e}{d^2 (d+e x)}\right ) \, dx}{6 e^2}\\ &=-\frac {b n}{6 e^2 (d+e x)^2}+\frac {b n}{6 d e^2 (d+e x)}+\frac {b n \log (x)}{6 d^2 e^2}+\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {b n \log (d+e x)}{6 d^2 e^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 135, normalized size = 1.15 \begin {gather*} \frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {b n \left (\frac {1}{(d+e x)^2}+\frac {2}{d (d+e x)}+\frac {2 \log (x)}{d^2}-\frac {2 \log (d+e x)}{d^2}\right )}{6 e^2}+\frac {b n \left (\frac {1}{d (d+e x)}+\frac {\log (x)}{d^2}-\frac {\log (d+e x)}{d^2}\right )}{2 e^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(a + b*Log[c*x^n]))/(d + e*x)^4,x]

[Out]

(d*(a + b*Log[c*x^n]))/(3*e^2*(d + e*x)^3) - (a + b*Log[c*x^n])/(2*e^2*(d + e*x)^2) - (b*n*((d + e*x)^(-2) + 2
/(d*(d + e*x)) + (2*Log[x])/d^2 - (2*Log[d + e*x])/d^2))/(6*e^2) + (b*n*(1/(d*(d + e*x)) + Log[x]/d^2 - Log[d
+ e*x]/d^2))/(2*e^2)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.14, size = 403, normalized size = 3.44

method result size
risch \(-\frac {b \left (3 e x +d \right ) \ln \left (x^{n}\right )}{6 \left (e x +d \right )^{3} e^{2}}-\frac {3 i \pi b \,d^{2} e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b \,d^{3} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b \,d^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-3 i \pi b \,d^{2} e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-i \pi b \,d^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-i \pi b \,d^{3} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-3 i \pi b \,d^{2} e x \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+3 i \pi b \,d^{2} e x \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-2 \ln \left (-x \right ) b \,e^{3} n \,x^{3}+2 \ln \left (e x +d \right ) b \,e^{3} n \,x^{3}-6 \ln \left (-x \right ) b d \,e^{2} n \,x^{2}+6 \ln \left (e x +d \right ) b d \,e^{2} n \,x^{2}-6 \ln \left (-x \right ) b \,d^{2} e n x +6 \ln \left (e x +d \right ) b \,d^{2} e n x -2 b d \,e^{2} n \,x^{2}+6 \ln \left (c \right ) b \,d^{2} e x -2 \ln \left (-x \right ) b \,d^{3} n +2 \ln \left (e x +d \right ) b \,d^{3} n -2 b \,d^{2} e n x +2 d^{3} b \ln \left (c \right )+6 a \,d^{2} e x +2 a \,d^{3}}{12 e^{2} d^{2} \left (e x +d \right )^{3}}\) \(403\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*ln(c*x^n))/(e*x+d)^4,x,method=_RETURNVERBOSE)

[Out]

-1/6*b*(3*e*x+d)/(e*x+d)^3/e^2*ln(x^n)-1/12*(3*I*Pi*b*d^2*e*x*csgn(I*c)*csgn(I*c*x^n)^2+I*Pi*b*d^3*csgn(I*x^n)
*csgn(I*c*x^n)^2+I*Pi*b*d^3*csgn(I*c)*csgn(I*c*x^n)^2-3*I*Pi*b*d^2*e*x*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-I*P
i*b*d^3*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-I*Pi*b*d^3*csgn(I*c*x^n)^3-3*I*Pi*b*d^2*e*x*csgn(I*c*x^n)^3+3*I*Pi
*b*d^2*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2-2*ln(-x)*b*e^3*n*x^3+2*ln(e*x+d)*b*e^3*n*x^3-6*ln(-x)*b*d*e^2*n*x^2+6*l
n(e*x+d)*b*d*e^2*n*x^2-6*ln(-x)*b*d^2*e*n*x+6*ln(e*x+d)*b*d^2*e*n*x-2*b*d*e^2*n*x^2+6*ln(c)*b*d^2*e*x-2*ln(-x)
*b*d^3*n+2*ln(e*x+d)*b*d^3*n-2*b*d^2*e*n*x+2*d^3*b*ln(c)+6*a*d^2*e*x+2*a*d^3)/e^2/d^2/(e*x+d)^3

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 142, normalized size = 1.21 \begin {gather*} \frac {1}{6} \, b n {\left (\frac {x}{d x^{2} e^{3} + 2 \, d^{2} x e^{2} + d^{3} e} - \frac {e^{\left (-2\right )} \log \left (x e + d\right )}{d^{2}} + \frac {e^{\left (-2\right )} \log \left (x\right )}{d^{2}}\right )} - \frac {{\left (3 \, x e + d\right )} b \log \left (c x^{n}\right )}{6 \, {\left (x^{3} e^{5} + 3 \, d x^{2} e^{4} + 3 \, d^{2} x e^{3} + d^{3} e^{2}\right )}} - \frac {{\left (3 \, x e + d\right )} a}{6 \, {\left (x^{3} e^{5} + 3 \, d x^{2} e^{4} + 3 \, d^{2} x e^{3} + d^{3} e^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))/(e*x+d)^4,x, algorithm="maxima")

[Out]

1/6*b*n*(x/(d*x^2*e^3 + 2*d^2*x*e^2 + d^3*e) - e^(-2)*log(x*e + d)/d^2 + e^(-2)*log(x)/d^2) - 1/6*(3*x*e + d)*
b*log(c*x^n)/(x^3*e^5 + 3*d*x^2*e^4 + 3*d^2*x*e^3 + d^3*e^2) - 1/6*(3*x*e + d)*a/(x^3*e^5 + 3*d*x^2*e^4 + 3*d^
2*x*e^3 + d^3*e^2)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 156, normalized size = 1.33 \begin {gather*} \frac {b d n x^{2} e^{2} - a d^{3} + {\left (b d^{2} n - 3 \, a d^{2}\right )} x e - {\left (b n x^{3} e^{3} + 3 \, b d n x^{2} e^{2} + 3 \, b d^{2} n x e + b d^{3} n\right )} \log \left (x e + d\right ) - {\left (3 \, b d^{2} x e + b d^{3}\right )} \log \left (c\right ) + {\left (b n x^{3} e^{3} + 3 \, b d n x^{2} e^{2}\right )} \log \left (x\right )}{6 \, {\left (d^{2} x^{3} e^{5} + 3 \, d^{3} x^{2} e^{4} + 3 \, d^{4} x e^{3} + d^{5} e^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))/(e*x+d)^4,x, algorithm="fricas")

[Out]

1/6*(b*d*n*x^2*e^2 - a*d^3 + (b*d^2*n - 3*a*d^2)*x*e - (b*n*x^3*e^3 + 3*b*d*n*x^2*e^2 + 3*b*d^2*n*x*e + b*d^3*
n)*log(x*e + d) - (3*b*d^2*x*e + b*d^3)*log(c) + (b*n*x^3*e^3 + 3*b*d*n*x^2*e^2)*log(x))/(d^2*x^3*e^5 + 3*d^3*
x^2*e^4 + 3*d^4*x*e^3 + d^5*e^2)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 661 vs. \(2 (112) = 224\).
time = 6.02, size = 661, normalized size = 5.65 \begin {gather*} \begin {cases} \tilde {\infty } \left (- \frac {a}{2 x^{2}} - \frac {b n}{4 x^{2}} - \frac {b \log {\left (c x^{n} \right )}}{2 x^{2}}\right ) & \text {for}\: d = 0 \wedge e = 0 \\\frac {\frac {a x^{2}}{2} - \frac {b n x^{2}}{4} + \frac {b x^{2} \log {\left (c x^{n} \right )}}{2}}{d^{4}} & \text {for}\: e = 0 \\\frac {- \frac {a}{2 x^{2}} - \frac {b n}{4 x^{2}} - \frac {b \log {\left (c x^{n} \right )}}{2 x^{2}}}{e^{4}} & \text {for}\: d = 0 \\- \frac {a d^{3}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {3 a d^{2} e x}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {b d^{3} n \log {\left (\frac {d}{e} + x \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {3 b d^{2} e n x \log {\left (\frac {d}{e} + x \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} + \frac {b d^{2} e n x}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {3 b d e^{2} n x^{2} \log {\left (\frac {d}{e} + x \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} + \frac {b d e^{2} n x^{2}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} + \frac {3 b d e^{2} x^{2} \log {\left (c x^{n} \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {b e^{3} n x^{3} \log {\left (\frac {d}{e} + x \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} + \frac {b e^{3} x^{3} \log {\left (c x^{n} \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*ln(c*x**n))/(e*x+d)**4,x)

[Out]

Piecewise((zoo*(-a/(2*x**2) - b*n/(4*x**2) - b*log(c*x**n)/(2*x**2)), Eq(d, 0) & Eq(e, 0)), ((a*x**2/2 - b*n*x
**2/4 + b*x**2*log(c*x**n)/2)/d**4, Eq(e, 0)), ((-a/(2*x**2) - b*n/(4*x**2) - b*log(c*x**n)/(2*x**2))/e**4, Eq
(d, 0)), (-a*d**3/(6*d**5*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3) - 3*a*d**2*e*x/(6*d**5
*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3) - b*d**3*n*log(d/e + x)/(6*d**5*e**2 + 18*d**4*
e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3) - 3*b*d**2*e*n*x*log(d/e + x)/(6*d**5*e**2 + 18*d**4*e**3*x + 1
8*d**3*e**4*x**2 + 6*d**2*e**5*x**3) + b*d**2*e*n*x/(6*d**5*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2
*e**5*x**3) - 3*b*d*e**2*n*x**2*log(d/e + x)/(6*d**5*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x
**3) + b*d*e**2*n*x**2/(6*d**5*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3) + 3*b*d*e**2*x**2
*log(c*x**n)/(6*d**5*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3) - b*e**3*n*x**3*log(d/e + x
)/(6*d**5*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3) + b*e**3*x**3*log(c*x**n)/(6*d**5*e**2
 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3), True))

________________________________________________________________________________________

Giac [A]
time = 4.00, size = 176, normalized size = 1.50 \begin {gather*} -\frac {b n x^{3} e^{3} \log \left (x e + d\right ) + 3 \, b d n x^{2} e^{2} \log \left (x e + d\right ) + 3 \, b d^{2} n x e \log \left (x e + d\right ) - b n x^{3} e^{3} \log \left (x\right ) - 3 \, b d n x^{2} e^{2} \log \left (x\right ) - b d n x^{2} e^{2} - b d^{2} n x e + b d^{3} n \log \left (x e + d\right ) + 3 \, b d^{2} x e \log \left (c\right ) + 3 \, a d^{2} x e + b d^{3} \log \left (c\right ) + a d^{3}}{6 \, {\left (d^{2} x^{3} e^{5} + 3 \, d^{3} x^{2} e^{4} + 3 \, d^{4} x e^{3} + d^{5} e^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))/(e*x+d)^4,x, algorithm="giac")

[Out]

-1/6*(b*n*x^3*e^3*log(x*e + d) + 3*b*d*n*x^2*e^2*log(x*e + d) + 3*b*d^2*n*x*e*log(x*e + d) - b*n*x^3*e^3*log(x
) - 3*b*d*n*x^2*e^2*log(x) - b*d*n*x^2*e^2 - b*d^2*n*x*e + b*d^3*n*log(x*e + d) + 3*b*d^2*x*e*log(c) + 3*a*d^2
*x*e + b*d^3*log(c) + a*d^3)/(d^2*x^3*e^5 + 3*d^3*x^2*e^4 + 3*d^4*x*e^3 + d^5*e^2)

________________________________________________________________________________________

Mupad [B]
time = 3.86, size = 141, normalized size = 1.21 \begin {gather*} -\frac {a\,d+x\,\left (3\,a\,e-b\,e\,n\right )-\frac {b\,e^2\,n\,x^2}{d}}{6\,d^3\,e^2+18\,d^2\,e^3\,x+18\,d\,e^4\,x^2+6\,e^5\,x^3}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d}{6\,e^2}+\frac {b\,x}{2\,e}\right )}{d^3+3\,d^2\,e\,x+3\,d\,e^2\,x^2+e^3\,x^3}-\frac {b\,n\,\mathrm {atanh}\left (\frac {2\,e\,x}{d}+1\right )}{3\,d^2\,e^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(a + b*log(c*x^n)))/(d + e*x)^4,x)

[Out]

- (a*d + x*(3*a*e - b*e*n) - (b*e^2*n*x^2)/d)/(6*d^3*e^2 + 6*e^5*x^3 + 18*d^2*e^3*x + 18*d*e^4*x^2) - (log(c*x
^n)*((b*d)/(6*e^2) + (b*x)/(2*e)))/(d^3 + e^3*x^3 + 3*d*e^2*x^2 + 3*d^2*e*x) - (b*n*atanh((2*e*x)/d + 1))/(3*d
^2*e^2)

________________________________________________________________________________________